using System;
using System.Data;
using System.Text;
using System.Collections.Generic;

#region user code using
#endregion user code using

namespace Adoor.DAL.Ouvrages
{
	#region user code namespace
	#endregion user code namespace
	
	
	public abstract class Ouvrage
	#region user code implements
	#endregion user code implements
	{
	
		public virtual System.Int32 Prix
		{
			get
			{
				System.Int32  value = this.m_Prix;
				#region user code get public System.Int32 Prix
				#endregion user code get public System.Int32 Prix
				return value; 
			}
			set
			{ 
				#region user code set public System.Int32 Prix
				#endregion user code set public System.Int32 Prix				
				this.m_Prix = value;
				OnPrixChanged();
			}
		}
		
		public event EventHandler PrixChanged;
		
		protected virtual void OnPrixChanged()
		{				
			if(PrixChanged != null)
				PrixChanged(this, System.EventArgs.Empty);			
					
			#region user code OnPrixChanged
			#endregion user code OnPrixChanged				
		}

		public virtual System.Boolean EstNouveaute
		{
			get
			{
				System.Boolean  value = this.m_EstNouveaute;
				#region user code get public System.Boolean EstNouveaute
				#endregion user code get public System.Boolean EstNouveaute
				return value; 
			}
			set
			{ 
				#region user code set public System.Boolean EstNouveaute
				#endregion user code set public System.Boolean EstNouveaute				
				this.m_EstNouveaute = value;
				OnEstNouveauteChanged();
			}
		}
		
		public event EventHandler EstNouveauteChanged;
		
		protected virtual void OnEstNouveauteChanged()
		{				
			if(EstNouveauteChanged != null)
				EstNouveauteChanged(this, System.EventArgs.Empty);			
					
			#region user code OnEstNouveauteChanged
			#endregion user code OnEstNouveauteChanged				
		}

		public virtual System.String Libelle
		{
			get
			{
				System.String  value = this.m_Libelle;
				#region user code get public System.String Libelle
				#endregion user code get public System.String Libelle
				return value; 
			}
			set
			{ 
				#region user code set public System.String Libelle
				#endregion user code set public System.String Libelle				
				this.m_Libelle = value;
				OnLibelleChanged();
			}
		}
		
		public event EventHandler LibelleChanged;
		
		protected virtual void OnLibelleChanged()
		{				
			if(LibelleChanged != null)
				LibelleChanged(this, System.EventArgs.Empty);			
					
			#region user code OnLibelleChanged
			#endregion user code OnLibelleChanged				
		}

		
		/// <summary>
		/// Called when user is creating a new entity.
		/// </summary>
		protected virtual void OnCreate(object[] args)
		{
			Prix = 0;		
	EstNouveaute = false;		
	Libelle = "";		
	
			#region user code OnCreate
			#endregion user code OnCreate			
		}
		
		/// <summary>
		/// Called when user is retreiving an entity from storage
		/// </summary>
		protected virtual void OnMaterialize()
		{
			#region user code OnMaterialize
			#endregion user code OnMaterialize
		}
		
		protected abstract System.Int32 m_Prix { get; set; }

		protected abstract System.Boolean m_EstNouveaute { get; set; }

		protected abstract System.String m_Libelle { get; set; }


		#region user code class
		#endregion user code class
	}
}
